xen: unpopulate memory when domain is static
authorPenny Zheng <Penny.Zheng@arm.com>
Tue, 6 Sep 2022 07:39:16 +0000 (15:39 +0800)
committerJulien Grall <jgrall@amazon.com>
Tue, 6 Sep 2022 16:53:35 +0000 (17:53 +0100)
commitb01721f0779d56a60b9db26a09b79b469f260d8a
tree30f83e06d876887fa510c713c3500a2699f9fdfe
parent5ebd3da7c95d1320e3005105d0163652d3f271b5
xen: unpopulate memory when domain is static

Today when a domain unpopulates the memory on runtime, they will always
hand the memory back to the heap allocator. And it will be a problem if domain
is static.

Pages as guest RAM for static domain shall be reserved to only this domain
and not be used for any other purposes, so they shall never go back to heap
allocator.

This commit puts reserved page on the new list resv_page_list after
it has been freed.

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/common/domain.c
xen/common/page_alloc.c
xen/include/xen/sched.h